package au.org.arcs.dss.provider.util;


import java.io.*;


/**
 *
 * @author ming
 */
public class MatchFileFilter implements FilenameFilter {
  private String fileName;

  public boolean accept(File dir, String name) {
    boolean matched = false;

    if (name.indexOf(fileName) >= 0) {
      matched = true;
    } else {
      matched = false;
    }

    return matched;
  }

  /**
   * @return the fileName
   */
  public String getFileName() {
    return fileName;
  }

  /**
   * @param fileName the fileName to set
   */
  public void setFileName(String fileName) {
    this.fileName = fileName;
  }
}
